/*
 * Map.h
 *
 *  Created on: Aug 25, 2011
 *      Author: mengwei.chua
 */

#ifndef MAP_H_
#define MAP_H_

#include <string>
#include <deque>

#include "util/IXmlParsable.h"
#include "Properties.h"
#include "TileSet.h"
#include "Layer.h"
#include "ObjectGroup.h"

namespace projectcos
{
namespace tile
{
namespace parser
{

class Map : public projectcos::util::IXmlParsable
{
public:
	Map();
	virtual ~Map();

	virtual bool Parse(const TiXmlElement* element);

	std::string GetVersion() const;
	std::string GetOrientation() const;
	unsigned int GetWidth() const;
	unsigned int GetHeight() const;
	unsigned int GetTileWidth() const;
	unsigned int GetTileHeight() const;

	void GetProperties(Properties& properties) const;
	void GetTileSets(std::deque<TileSet>& tileSets) const;
	void GetLayers(std::deque<Layer>& layers) const;
	void GetObjectGroup(std::deque<ObjectGroup>& objectGroups) const;

protected:
private:
	std::string m_Version;
	std::string m_Orientation;
	unsigned int m_Width;
	unsigned int m_Height;
	unsigned int m_TileWidth;
	unsigned int m_TileHeight;

	Properties m_Properties;
	std::deque<TileSet> m_TileSetList;
	std::deque<Layer> m_LayerList;
	std::deque<ObjectGroup> m_ObjectGroupList;
};

} // parser
} // tile
} // projectcos


#endif /* MAP_H_ */
